package vip.youngboy.freejump.persist.bus.buscolctrl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import vip.youngboy.freejump.domain.bus.BusColCtrl;
import vip.youngboy.freejump.persist.bus.buscol.BusColPersistence;
import vip.youngboy.freejump.repository.BusColCtrlRepository;

@Component
public class DefaultBusColCtrlPersistence implements BusColCtrlPersistence {

    @Autowired
    private BusColCtrlRepository busColCtrlRepository;

    @Override
    public void removeByTableId(String colId) {
        busColCtrlRepository.deleteByColId(colId);
    }

    @Override
    public BusColCtrl getByColumnId(String colId) {
        return busColCtrlRepository.findByColId(colId);
    }

}
